home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
dns
/
dnssec.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
1KB
|
40 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
RSAMD5 = 1
DH = 2
DSA = 3
ECC = 4
INDIRECT = 252
PRIVATEDNS = 253
PRIVATEOID = 254
_algorithm_by_text = {
'RSAMD5': RSAMD5,
'DH': DH,
'DSA': DSA,
'ECC': ECC,
'INDIRECT': INDIRECT,
'PRIVATEDNS': PRIVATEDNS,
'PRIVATEOID': PRIVATEOID }
_algorithm_by_value = []([ (y, x) for x, y in _algorithm_by_text.iteritems() ])
class UnknownAlgorithm(Exception):
pass
def algorithm_from_text(text):
value = _algorithm_by_text.get(text.upper())
if value is None:
value = int(text)
return value
def algorithm_to_text(value):
text = _algorithm_by_value.get(value)
if text is None:
text = str(value)
return text